package com.cntcdt.api.db.model.base;

import java.io.Serializable;
import java.sql.ResultSet;
import java.util.Date;

/**
 * 这是admin_user的数据传输对象基类,直接与表对应<br>
 */
public abstract class AdminUserModelBase  implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 属性:id<br>
     */
    private Integer id;
    /**
     * 属性:用户名<br>
     * 含义:用户名<br>
     */
    private String username;
    /**
     * 属性:密码<br>
     * 含义:密码<br>
     */
    private String password;
    /**
     * 属性:用户名称<br>
     * 含义:用户名称<br>
     */
    private String name;
    /**
     * 属性:addTime<br>
     */
    private Date addTime;
    /**
     * 属性:updateTime<br>
     */
    private Date updateTime;
    
    private Integer cntbg;
    
    private Integer readData;
    
    private Integer pickupMoney;
    
    private Integer operateDevice;
    
    private Integer addLineBg;
    
    private Integer consociationBg;

    private Integer userAdminBg;
    
    private Integer laidianUserBg;
    
    private Integer opStatus;
    
    private String accessToken;
    
    private String laidianMobile;
    
    private Integer deviceBg;
    
    private Integer updateDeviceBg;
    
    private Integer deviceMoveApplyBg;
    private Integer remoteControl;
    
    private Integer chongdianbaoBg;
    
    private Integer cooperationBg;
    
    private Integer addLineShowAllDevice;
    
    private Integer adminGroupId;
    
    /**
     *  默认构造方法,构造一个默认的AddLineUserModelBase对象
     */
    public AdminUserModelBase(){
    }

    /**
     *  构造函数
     *  @param rs 数据库查询结果集
     */
    public AdminUserModelBase(ResultSet rs){
           try{
               this.id = rs.getInt("id");
               this.username = rs.getString("username");
               this.password = rs.getString("password");
               this.name = rs.getString("name");
               this.addTime = rs.getDate("addTime");
               this.updateTime = rs.getDate("updateTime");
               this.cntbg = rs.getInt("cntbg");
               this.readData = rs.getInt("readData");
               this.pickupMoney = rs.getInt("pickupMoney");
               this.operateDevice = rs.getInt("operateDevice");
               this.addLineBg = rs.getInt("addLineBg");
               this.consociationBg = rs.getInt("consociationBg");
               this.userAdminBg = rs.getInt("userAdminBg");
               this.laidianUserBg = rs.getInt("laidianUserBg");
               this.opStatus = rs.getInt("opStatus");
               this.accessToken = rs.getString("accessToken");
               this.laidianMobile = rs.getString("laidianMobile");
               this.deviceBg = rs.getInt("deviceBg");
               this.updateDeviceBg = rs.getInt("updateDeviceBg");
               this.deviceMoveApplyBg = rs.getInt("deviceMoveApplyBg");
               this.remoteControl = rs.getInt("remoteControl");
               this.chongdianbaoBg = rs.getInt("chongdianbaoBg");
               this.cooperationBg = rs.getInt("cooperationBg");
               this.addLineShowAllDevice = rs.getInt("addLineShowAllDevice");
               this.adminGroupId = rs.getInt("adminGroupId");
           }catch(Exception e) {
              e.printStackTrace(); 
           }
    }
    
    
	public Integer getAdminGroupId() {
		return adminGroupId;
	}

	public void setAdminGroupId(Integer adminGroupId) {
		this.adminGroupId = adminGroupId;
	}

	public Integer getAddLineShowAllDevice() {
		return addLineShowAllDevice;
	}

	public void setAddLineShowAllDevice(Integer addLineShowAllDevice) {
		this.addLineShowAllDevice = addLineShowAllDevice;
	}

	public Integer getChongdianbaoBg() {
		return chongdianbaoBg;
	}

	public void setChongdianbaoBg(Integer chongdianbaoBg) {
		this.chongdianbaoBg = chongdianbaoBg;
	}

	public Integer getCooperationBg() {
		return cooperationBg;
	}

	public void setCooperationBg(Integer cooperationBg) {
		this.cooperationBg = cooperationBg;
	}

	public Integer getDeviceMoveApplyBg() {
		return deviceMoveApplyBg;
	}

	public void setDeviceMoveApplyBg(Integer deviceMoveApplyBg) {
		this.deviceMoveApplyBg = deviceMoveApplyBg;
	}

	public Integer getUpdateDeviceBg() {
		return updateDeviceBg;
	}

	public void setUpdateDeviceBg(Integer updateDeviceBg) {
		this.updateDeviceBg = updateDeviceBg;
	}

	public String getLaidianMobile() {
		return laidianMobile;
	}

	public void setLaidianMobile(String laidianMobile) {
		this.laidianMobile = laidianMobile;
	}

	public Integer getDeviceBg() {
		return deviceBg;
	}

	public void setDeviceBg(Integer deviceBg) {
		this.deviceBg = deviceBg;
	}

	public String getAccessToken() {
		return accessToken;
	}

	public void setAccessToken(String accessToken) {
		this.accessToken = accessToken;
	}

	public Integer getOpStatus() {
		return opStatus;
	}

	public void setOpStatus(Integer opStatus) {
		this.opStatus = opStatus;
	}

	public Integer getCntbg() {
		return cntbg;
	}

	public void setCntbg(Integer cntbg) {
		this.cntbg = cntbg;
	}

	public Integer getReadData() {
		return readData;
	}

	public void setReadData(Integer readData) {
		this.readData = readData;
	}

	public Integer getPickupMoney() {
		return pickupMoney;
	}

	public void setPickupMoney(Integer pickupMoney) {
		this.pickupMoney = pickupMoney;
	}

	public Integer getOperateDevice() {
		return operateDevice;
	}

	public void setOperateDevice(Integer operateDevice) {
		this.operateDevice = operateDevice;
	}

	public Integer getAddLineBg() {
		return addLineBg;
	}

	public void setAddLineBg(Integer addLineBg) {
		this.addLineBg = addLineBg;
	}

	public Integer getConsociationBg() {
		return consociationBg;
	}

	public void setConsociationBg(Integer consociationBg) {
		this.consociationBg = consociationBg;
	}

	public Integer getUserAdminBg() {
		return userAdminBg;
	}

	public void setUserAdminBg(Integer userAdminBg) {
		this.userAdminBg = userAdminBg;
	}

	public Integer getLaidianUserBg() {
		return laidianUserBg;
	}

	public void setLaidianUserBg(Integer laidianUserBg) {
		this.laidianUserBg = laidianUserBg;
	}

	/**
     * 设置属性id<br>
     * @param id 待设置的属性id的值
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取属性id<br>
     * @return 属性id的值
     */
    public Integer getId() {
        return id;
    }

    /**
     * 设置属性用户名<br>
     * 含义:用户名<br>
     * @param username 待设置的属性用户名的值
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * 获取属性用户名<br>
     * 含义:用户名<br>
     * @return 属性用户名的值
     */
    public String getUsername() {
        return username;
    }

    /**
     * 设置属性密码<br>
     * 含义:密码<br>
     * @param password 待设置的属性密码的值
     */
    public void setPassword(String password) {
        this.password = password;
    }

    /**
     * 获取属性密码<br>
     * 含义:密码<br>
     * @return 属性密码的值
     */
    public String getPassword() {
        return password;
    }

    /**
     * 设置属性用户名称<br>
     * 含义:用户名称<br>
     * @param name 待设置的属性用户名称的值
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取属性用户名称<br>
     * 含义:用户名称<br>
     * @return 属性用户名称的值
     */
    public String getName() {
        return name;
    }

    /**
     * 设置属性addTime<br>
     * @param addTime 待设置的属性addTime的值
     */
    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    /**
     * 获取属性addTime<br>
     * @return 属性addTime的值
     */
    public Date getAddTime() {
        return addTime;
    }

    /**
     * 设置属性updateTime<br>
     * @param updateTime 待设置的属性updateTime的值
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 获取属性updateTime<br>
     * @return 属性updateTime的值
     */
    public Date getUpdateTime() {
        return updateTime;
    }


    /**
     * 比较两个对象在逻辑上是否相等
     * @see java.lang.Object#equals(java.lang.Object)
     */
    public boolean equals(Object other) {
        if (this == other) {
            return true;
        }
        if (!(other instanceof AdminUserModelBase)) {
            return false;
        }

        final AdminUserModelBase otherModel = (AdminUserModelBase) other;
        if (getId()!=null && !getId().equals(otherModel.getId())) {
            return false;
        }
        return true;
    }

    /**
     * 根据主键生成HashCode
     * @see java.lang.Object#hashCode()
     */
    public int hashCode() {
        StringBuffer buffer = new StringBuffer();
        buffer.append('|').append(id);
        return buffer.toString().hashCode();
    }

	public Integer getRemoteControl() {
		return remoteControl;
	}

	public void setRemoteControl(Integer remoteControl) {
		this.remoteControl = remoteControl;
	}
}
